Don't forget to cleanup varargs
authorMatthias Clasen <mclasen@redhat.com>
Wed, 15 Jun 2011 01:14:48 +0000 (21:14 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 15 Jun 2011 01:14:48 +0000 (21:14 -0400)
gtk/gtkliststore.c

index 4671bfe035b9e2edea8ceb97f83f42b33eba0b4d..1844a8bbcf10325998b527e734c77da475003b75 100644 (file)
@@ -445,11 +445,13 @@ gtk_list_store_new (gint n_columns,
     {
       GType type = va_arg (args, GType);
       if (! _gtk_tree_data_list_check_type (type))
-       {
-         g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type));
-         g_object_unref (retval);
-         return NULL;
-       }
+        {
+          g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type));
+          g_object_unref (retval);
+          va_end (args);
+
+          return NULL;
+        }
 
       gtk_list_store_set_column_type (retval, i, type);
     }